package com.micro.school.system.api;

import com.micro.school.common.core.constant.ServiceNameConstants;
import com.micro.school.common.core.domain.R;
import com.micro.school.system.api.domain.vo.*;
import com.micro.school.system.api.domain.vo.order.PayStudentFeeVo;
import com.micro.school.system.api.factory.RemoteOrderFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

@FeignClient(contextId = "remoteOrderService", value = ServiceNameConstants.ORDER_SERVICE, fallbackFactory = RemoteOrderFallbackFactory.class)
public interface RemoteOrderService {

    @PostMapping("/pay/payStudentFee/getFeignFeeVos")
    R<PayStudentFeeVos> queryStudentFee(@RequestBody PayStudentFeeVos payStudentFeeVos);

    @PostMapping("/pay/payStudentFee/getFeignFeeItemVo")
    R<Map<String, Map<String, Object>>> queryStudentFeeItem(@RequestBody PayStudentFeeVos payStudentFeeVos);

    @PostMapping("/pay/payStudentFee/getFeignFeeItemDetailVo")
    R<List<PayStudentFeeItemVos>> queryStudentFeeItemDetails(@RequestBody PayStudentFeeVos payStudentFeeVos);


    @PostMapping("/payStudentPrepayment/getStudentPrepaymentVos")
    R<List<PayStudentPrepaymentVos>> getStudentPrepaymentVos(@RequestBody PayStudentPrepaymentVos payStudentPrepaymentVos);

    @PostMapping("/payStudentPrepayment/getStudentPrepaymentNoVos")
    R<List<PayStudentPrepaymentVos>> getStudentPrepaymentNoVos(@RequestBody PayStudentPrepaymentVos payStudentPrepaymentVos);



    @PostMapping("/payStudentPrepayment/updateCollectionStatus")
    void updateCollectionStatus(@RequestBody PayStudentPrepaymentVos payStudentPrepayment);

    @PostMapping("/pay/payStudentFeePayment/insertPayStudentFeePayment")
    void insertPayStudentFeePayment(@RequestBody PayStudentFeePaymentVos payStudentFeePaymentVos);

    @PostMapping("/pay/payFeeItemConfig/selectMerchantByConfigId")
    PayFeeItemConfigVos selectMerchantByConfigId(@RequestBody PayFeeItemConfigVos payFeeItemConfigVos);

    @PostMapping("/pay/payStudentFeePaymentDetail/insertPayStudentFeePaymentDetailVos")
    void insertPayStudentFeePaymentDetailVos(@RequestBody PayStudentFeePaymentDetailVos detail);

    @PostMapping("/payStudentPrepayment/updateStudentPrepayment")
    void updateStudentPrepayment(@RequestBody PayStudentPrepaymentVos prepayment);

    /**
     * 账单管理-H5使用
     * */
    @GetMapping(value = "/pay/studentBill/h5/student/{studentId}")
    public R<List<PayStudentFeeVo>> getStudentBillH5(@PathVariable("studentId") Integer studentId);

    /**
     * 学费交费记录
     */
    @GetMapping(value = "/pay/studentBill/h5/payment/{studentId}")
    public R<List<PayStudentFeeVo>> getStudentPaymentInfo(@PathVariable("studentId") Integer studentId);


    @GetMapping(value = "/pay/payStudentFeePayment/selectStudentFeeByStudentId")
    R<List<StudentPayVos>> selectStudentFeeByStudentId(@RequestParam("studentId") Long studentId,@RequestParam("feeYearId") Long feeYearId);


    @GetMapping(value = "/pay/payStudentFeePayment/updateAllPayStudentFeePayment")
    Map<String,Object> updateAllPayStudentFeePayment(@RequestParam("payNumber") String payNumber,@RequestParam("status") Long status);

    @PostMapping("/pay/payStudentFeePayment/updateStudentFeePayment")
    R<PayStudentFeePaymentVos> updateStudentFeePayment(@RequestBody PayStudentFeePaymentVos payStudentFeePaymentVos);

    @PostMapping("/pay/payStudentFee/updateStudentFee")
    void updateStudentFee(@RequestBody List<PayStudentFeePaymentDetailVos> payStudentFeePaymentVosDetails);

    @PostMapping("/pay/payStudentFee/queryStudentFeeByDetail")
    PayStudentFeeVos queryStudentFeeByDetail(@RequestParam("studentFeeId") Long studentFeeId);

    @PostMapping("/pay/payStudentFee/sumStudentFee")
    BigDecimal sumStudentFee(@RequestParam("studentFeeId") Long studentFeeId);

    @PostMapping("/pay/payStudentFee/updateStudentFeeTotalMoney")
    void updateStudentFeeTotalMoney(@RequestBody PayStudentFeeVos payStudentFeeVos1);

    @PostMapping(value = "/pay/payStudentFee/updateAllOrderCollegeName")
    void updateAllOrderCollegeName(@RequestParam("collegeName")String collegeName,@RequestParam("collegeId") Long collegeId);

    @PostMapping(value = "/pay/payStudentFee/updateAllCollegeMajor")
    void updateAllCollegeMajor(@RequestParam("majorName")String majorName,@RequestParam("id") Long id);

    @PostMapping(value = "/pay/payStudentFee/updateAllCollegeModel")
    void updateAllCollegeModel(@RequestParam("modelName")String modelName,@RequestParam("id") Long id);

    @PostMapping(value = "/pay/payStudentFee/updateAllCampusName")
    void updateAllCampusName(@RequestParam("campusName")String campusName,@RequestParam("id") Long id);

    @PostMapping(value = "/pay/payStudentFee/updateAllFeeYear")
    void updateAllFeeYear(@RequestParam("feeYear")String feeYear,@RequestParam("id") Long id);


}
